package cn.tedu.csmall.passport.pojo.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@Accessors(chain = true)
public class AdminAddNewParam implements Serializable {

    @NotNull(message = "添加管理员失败，必须提交用户名！")
    @ApiModelProperty(value = "用户名", required = true, example = "八神嘉儿")
    private String username;

    @NotNull(message = "添加管理员失败，必须提交密码！")
    @ApiModelProperty(value = "密码", required = true, example = "jiaer123456")
    private String password;

    @NotNull(message = "添加管理员失败，必须提交昵称！")
    @ApiModelProperty(value = "昵称", required = true, example = "嘉儿")
    private String nickname;

    @NotNull(message = "添加管理员失败，必须上传头像！")
    @ApiModelProperty(value = "头像", required = true, example = "http://jiaer")
    private String avatar;

    @NotNull(message = "添加管理员失败，必须提交手机号码！")
    @ApiModelProperty(value = "手机号", required = true, example = "123456")
    private String phone;

    @NotNull(message = "添加管理员失败，必须提交邮箱！")
    @ApiModelProperty(value = "邮箱", required = true, example = "jiaer@digital.com")
    private String email;

    @NotNull(message = "添加管理员失败，必须提交简介！")
    @ApiModelProperty(value = "简介", required = true, example = "八神嘉儿")
    private String description;

    @NotNull(message = "添加管理员失败，必须提交是否启用！")
    @Range(min = 0, max = 1, message = "添加管理员失败，是否启用的值必须是0或1,1是启用，0是不启用！")
    @ApiModelProperty(value = "是否启用", required = true, example = "1")
    private Integer enable;

    private Long[] roleIds;

}
